home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / SNDLIST- / SNDLIST.H < prev    next >
Text File  |  1988-11-10  |  2KB  |  91 lines

  1. /*
  2.     Sound lister
  3.     "SndList.h"
  4. */
  5.  
  6. #ifndef    _DialogMgr_
  7. #include <DialogMgr.h>
  8. #endif
  9.  
  10. #ifndef    _ListMgr_
  11. #include <ListMgr.h>
  12. #endif
  13.  
  14. #ifndef    _OSUtil_
  15. #include <OSUtil.h>
  16. #endif
  17.  
  18. #define APPL                128        /* ID of application 'ICN#' */
  19. #define maxOpenDocuments    5
  20.  
  21. #define    rMenuBar    128
  22. #define    mApple        128
  23. #define     iAbout        1
  24. #define    mFile        129
  25. #define     iOpen        1
  26. #define     iClose        2
  27. #define     iQuit        4
  28. #define mEdit        130
  29. #define        iUndo        1
  30. #define        iCut        3
  31. #define     iCopy        4
  32. #define     iPaste        5
  33. #define     iClear        6
  34.  
  35. #define AboutDialog    128            /* About dialog */
  36. #define        AboutOk        1
  37. #define        AboutText    2
  38. #define        AboutVers    3
  39. #define        AboutHeap    4
  40. #define        AboutIcon    5
  41.  
  42. #define rDialog        129            /* 'DLOG' resource id */
  43. #define        iPlay        1        /* "Play" button */
  44. #define        iList        2        /* Scrollable list (user item) */
  45. #define        iLevel        3        /* Volume level scrool bar (cntrl item) */
  46.  
  47. #define rMessage    130            /* Message dialog */
  48. #define        mOld        128        /* 'STR ': old system */
  49. #define        mSorry        129        /* 'STR ': no 'snd ' resources */
  50.  
  51. #define rEdit        131            /* Edit sound dialog */
  52. #define        eCancel        1        /* "Cancel" button */
  53. #define        eOk            2        /* "OK" button */
  54. #define        ePlay        3        /* "Play" button */
  55. #define        eRate        4        /* Sampling rate field */
  56. #define        eNote        5        /* Base note field */
  57. #define        eName        6        /* Name field */
  58. #define        eType        7        /* Type of 'snd ' resource */
  59. #define        eCalc1        8        /* Calculate rate=f(base) */
  60. #define        eCalc2        9        /* Calculate rate=f(base) */
  61.  
  62. #define ListCursor    128            /* Curser used when in list */
  63. #define HiSnd        "128"        /* 'snd ' when started */
  64. #define ByeSnd        "129"        /* 'snd ' when quit */
  65. #define AboutSnd    "130"        /* 'snd ' when about... */
  66.  
  67. typedef struct {
  68.     DialogRecord    window;        /* Title is file name */
  69.     ListHandle        list;        /* Scrolling list */
  70.     short            volume;        /* Volume reference number */
  71. } DocumentRecord, *DocumentPeek;
  72.  
  73. #define HiWrd(aLong)    (((aLong) >> 16) & 0xFFFF)
  74. #define LoWrd(aLong)    ((aLong) & 0xFFFF;
  75.  
  76. #ifdef GLOBALS
  77. SysEnvRec        gMac;
  78. Boolean            gHasWaitNextEvent;
  79. Boolean            gInBackground;
  80. short            gNumDocuments;
  81. unsigned char    EmptyStr[] = "";
  82. Rect            Bounds;
  83. #else
  84. extern SysEnvRec        gMac;
  85. extern Boolean            gHasWaitNextEvent;
  86. extern Boolean            gInBackground;
  87. extern short            gNumDocuments;
  88. extern unsigned char    EmptyStr[];
  89. extern Rect                Bounds;
  90. #endif
  91.